CALL 0_header.cmd
color 4f
if defined cookie goto :auto

ECHO ************************ WARNING ****************************
ECHO.
ECHO WARNING this program will destroy all data on HARD DRIVE 0.
ECHO Make sure you have a backup before you continue.
ECHO Windows 7 requires 2 partitions - (System, Windows).
ECHO This will destory and create 2 new partitions.
ECHO Please return to main menu if you do not want to lose data.
ECHO.
ECHO *************************************************************
ECHO.
ECHO 1. Format computer for Windows XP
ECHO 2. Format computer for Windows 7
ECHO 0. Go back to Main Menu, I'm scared
ECHO.

set /p menu="%choice_text%"
if "%menu%" ==  "2" goto :diskpart_win7
if "%menu%" ==  "1" goto :diskpart_winxp
if "%menu%" ==  "0" goto :imager

:break
goto :imager

:auto
set cookie=ntfs
goto :diskpart_win7

:diskpart_winxp
DISKPART /s 1_diskpart_winxp.txt
ECHO.
ECHO.
ECHO Setting WINDOWS Partition is set to W:\
goto wait

:diskpart_win7
DISKPART /s 1_diskpart_win7.txt
ECHO.
ECHO.
ECHO Setting SYSTEM Partition is set to S:\
ECHO Setting WINDOWS Partition is set to W:\
goto wait

:wait
ECHO.
ECHO Returning to main menu
ECHO.
ping 127.0.0.1 -n 4 >nul
goto complete

:complete
REM setting the step changes the status on return to main menu
set step=2

:imager
0_main_menu.cmd

:end

